<template>
    <div class="w344 h100 br-5 bgc-g my20 fxsys ovh">
        <div class="h100p fx-g1 tc-f fycxc" v-for="item,index in list" :key="index">
            <span class="t24-b">{{index == 1 ? goodsNum : 0}}</span>
            <span class="t12 mt10">{{item.text}}</span>
        </div>
    </div>
</template>

<script>
export default {
    computed: {
        goodsNum() {
            return this.$store.getters.getGoodsNum;
        },
    },
    watch: {
        goodsNum(newval) {
            this.list[1].num = newval;
        },
    },
    data() {
        return {
            list: [
                { text: "用户个数", num: 0 },
                { text: "商品个数", num: 0 },
                { text: "今日卖出", num: 0 },
            ],
        };
    },
};
</script>

<style>
</style>